package top.huhuiyu.springboot3.controller;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huhuiyu.springboot3.base.R;

@RestController
public class IndexController {

    @RequestMapping("")
    public R<String> home(String name) {
        return R.ok("欢迎" + (StringUtils.hasText(name) ? name.trim() : "无名氏"));
    }
}
